package com.jifeng.sterilizer.controller;

import com.jifeng.sterilizer.service.HomeService;
import com.jifeng.sterilizer.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("sterilizer/home")
public class HomeController {

    @Autowired
    HomeService homeService;

    // 获取用户绑定的消毒器
    @GetMapping("/listUserDevices")
    public R listUserDevices(@RequestParam Map<String,Object> params){
       R rs= homeService.getListUserDevices(params);
       return rs;
    }

    // 获取用户绑定的消毒器 微信小程序
    @GetMapping("/wx/listUserDevices")
    public R wxListUserDevices(@RequestParam Map<String,Object> params){
        R rs= homeService.getListUserDevices(params);
        return rs;
    }

    // PC端首页
    @GetMapping("/pc/count")
    public R pcGetHomeInfo(){
        R rs= homeService.pcGetHomeInfo();
        return rs;
    }

}
